package com.ruoyi.project.wenyanwen.uuidmapper.service.impl;

import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.framework.aspectj.lang.annotation.DataSource;
import com.ruoyi.framework.aspectj.lang.enums.DataSourceType;
import com.ruoyi.project.wenyanwen.uuidmapper.domain.UuidMapper;
import com.ruoyi.project.wenyanwen.uuidmapper.mapper.UuidMapperMapper;
import com.ruoyi.project.wenyanwen.uuidmapper.service.IUuidMapperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * UUID映射Service业务层处理
 *
 * @author shixiangwen
 * @date 2020-08-13
 */
@Service
@DataSource(DataSourceType.KKWENYANWEN)
public class UuidMapperServiceImpl implements IUuidMapperService {
    @Autowired
    private UuidMapperMapper uuidMapperMapper;

    /**
     * 查询UUID映射
     *
     * @param id UUID映射ID
     * @return UUID映射
     */
    @Override
    public UuidMapper selectUuidMapperById(Long id) {
        return uuidMapperMapper.selectUuidMapperById(id);
    }

    /**
     * 查询UUID映射列表
     *
     * @param uuidMapper UUID映射
     * @return UUID映射
     */
    @Override
    public List<UuidMapper> selectUuidMapperList(UuidMapper uuidMapper) {
        return uuidMapperMapper.selectUuidMapperList(uuidMapper);
    }

    /**
     * 新增UUID映射
     *
     * @param uuidMapper UUID映射
     * @return 结果
     */
    @Override
    public int insertUuidMapper(UuidMapper uuidMapper) {
        return uuidMapperMapper.insertUuidMapper(uuidMapper);
    }

    /**
     * 修改UUID映射
     *
     * @param uuidMapper UUID映射
     * @return 结果
     */
    @Override
    public int updateUuidMapper(UuidMapper uuidMapper) {
        return uuidMapperMapper.updateUuidMapper(uuidMapper);
    }

    /**
     * 删除UUID映射对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteUuidMapperByIds(String ids) {
        return uuidMapperMapper.deleteUuidMapperByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除UUID映射信息
     *
     * @param id UUID映射ID
     * @return 结果
     */
    @Override
    public int deleteUuidMapperById(Long id) {
        return uuidMapperMapper.deleteUuidMapperById(id);
    }
}
